package org.feiye.studyday23;

import java.util.Scanner;

public class StringBufferTest {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("请输入一个数字：");
		String next = in.next();
		StringBuffer s = new StringBuffer(next);
		for (int i = s.length() - 3; i > 0; i -= 3) {
			s.insert(i, ",");
		}
		System.out.println(s);
	}

}
